<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>上传文件</title>
    <style>
        .imglist {
            margin: 0 auto;
            width: 800px;
        }

        .imglist li {
            float: left;
            list-style: none;
            width: 234px;
            height: 168px;
        }

        .imglist li img {
            width: 100%;
        }

        .imglist li span{
            font-size: 70%;
            color: gray;
        }
    </style>
</head>

<body>
    <h1><%=title%></h1>
    <form action="/file/upload" method="post" enctype="multipart/form-data">
        <input type="file" name="files" id="" multiple>
        <input type="submit" value="上传">
    </form>
    <div class="imglist">
        <ul>
            
            <% filesArr.forEach(function(file){ %>                    
            <li>
                <img src="img/<%=file.filename%>">
                <p><%=file.originalname%>
                    <span><%=Math.floor(file.size/10) / 100%> KB</span>
                </p>
            </li>
            <% }); %>
            
        </ul>
    </div>
</body>

</html>